# -*- coding: utf-8 -*-
# @Time     : 2021/4/29 17:01
# @Author   : pengrenjie
# @Email    : 941257162@.com
# @File     : test.py
import string
import random
with open("big.data",'wb+') as f:
    for i in range(10**7):
        f.write(("".join(random.choices(string.ascii_lowercase,k=random.randint(1,50)))+"\n").encode("utf-8"))
def read_file(path):
    with open(path,'r+') as f:
        while 1:
            b = f.readline()
            if b:
                yield b
            else:
                return
g = read_file("big.data")

print(max((len(i))for i in g))


